package com.zzl.gulimall.product.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;

import com.zzl.common.valid.ListValid;
import lombok.Data;
import org.hibernate.validator.constraints.URL;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 *
 * @author zzl
 * @email zhuangzhongliang@163.com
 * @date 2021-03-10 14:06:58
 */
@Data
@TableName("pms_brand")
public class BrandEntity implements Serializable {
	private static final long serialVersionUID = 1L;


	@TableId
	private Long brandId;

	@NotBlank(message = "name必须填写")
	private String name;

	@URL(message = "log必须是个url")
	private String logo;

	private String descript;

	@ListValid(vals = {0,1})
	private Integer showStatus;

	@Pattern(regexp = "/^[a-zA-Z]$/",message = "检索首字符必须是一个字符")
	private String firstLetter;

	@Min(value = 0)
	private Integer sort;

}
